class Solution:
    def kClosest(self, points: List[List[int]], K: int) -> List[List[int]]:
        def calc(cord):
            return cord[0]*cord[0]+cord[1]*cord[1]
        result=sorted(points,key=lambda x:calc(x))
        return result[:K]